#!/usr/bin/env python
#-*- coding:utf-8 -*-

# --------------------------------------------------------
# Fast R-CNN
# Copyright (c) 2015 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Ross Girshick
# --------------------------------------------------------


"""Set up paths for Fast R-CNN."""

import os.path as osp
import sys

def add_path(path):
    if path not in sys.path:
        # sys.path是一个关于模块的搜索路径的列表，其初值为
        # 其初始值为环境变量PYTHONPATH，外加一个默认安装路径
        sys.path.insert(0, path)
        # 将path插入到列表sys.path的第一个位置

this_dir = osp.dirname(__file__)  # __file__获得当前主脚本的路径

# Add caffe to PYTHONPATH
caffe_path = osp.join(this_dir, '..', 'caffe-fast-rcnn', 'python') # /../是干啥的？？？
add_path(caffe_path)

# Add lib to PYTHONPATH
lib_path = osp.join(this_dir, '..', 'lib')
add_path(lib_path)
